---
feature_name: Classes (ES6)
chrome_version: 42
feature_id: 4633745457938432
---

<h3>Background</h3>
<p>
  ES6 Classes formalize the common JavaScript pattern of simulating class-like inheritance hierarchies
  using functions and prototypes. They are effectively simple sugaring over prototype-based OO, offering
  a convenient declarative form for class patterns which encourage interoperability.
</p>
<p>
  Classes (as shipped in Chrome) support prototype-based inheritance, constructors, super calls, instance
  and static methods. The samples included in this demo are:
</p>
<p>
  <ul>
    <li>Creating a new class (declaration-form)</li>
    <li>Creating a new class (expression-form)</li>
    <li>Extending an existing class</li>
    <li>Subclassing methods of a parent class</li>
    <li>Defining static methods</li>
    <li>Subclassing built-ins</li>
   </ul>
</p>

{% include output_helper.html %}

{% include js_snippet.html filename='demo.js' %}
